package com.math.util;

import java.io.Serializable;

public class InitializationBean  implements Serializable {

	private static final long serialVersionUID = 1L;
	
	//percentage investments costs
	private Double percentagePersonal;
	private Double percentageRD;
	private Double percentageMarketing;
	
	//maxvalues investments costs
	private Double maxPersonal;
	private Double maxRD;
	private Double maxMarketing;
	
	//report costs
	private Double reportSmall;
	private Double reportMiddle;
	private Double reportBig;
	private Double reportSpy;
	// report costs percentage
	private Double reportSmallPercentage;
	private Double reportMiddlePercentage;
	private Double reportBigPercentage;
	private Double reportSpyPercentage;
	
	//logistic costs
	private Double logisticCosts;
	private Double logisticCostsPercentage;
	
	private Integer amountCompanies;
	private Integer amountAgents;
	private Double factorAgents;
	
	private Double sumProfit;
	private Double sumRevenue;
	
	//initial budget for the companies
	private Double startBudget;
	private Double startBudgetPercentage;
	
	public InitializationBean() {
		super();
	}
	
	/**
	 * calculate Investment costs out of revenue and percentages
	 */
	public void calculateCosts(){
		this.maxMarketing = CalculationUtil.roundDoubleCalcPrecision(this.sumRevenue * this.percentageMarketing);
		this.maxRD = CalculationUtil.roundDoubleCalcPrecision(this.sumRevenue * this.percentageRD);
		this.maxPersonal = CalculationUtil.roundDoubleCalcPrecision(this.sumRevenue * this.percentagePersonal);
		
		this.logisticCosts = CalculationUtil.roundDoubleCalcPrecision(this.sumRevenue * this.logisticCostsPercentage);
		
		this.reportSmall = CalculationUtil.roundDoubleCalcPrecision(this.sumRevenue * this.reportSmallPercentage);
		this.reportMiddle = CalculationUtil.roundDoubleCalcPrecision(this.sumRevenue * this.reportMiddlePercentage);
		this.reportBig = CalculationUtil.roundDoubleCalcPrecision(this.sumRevenue * this.reportBigPercentage);
		this.reportSpy = CalculationUtil.roundDoubleCalcPrecision(this.sumRevenue * this.reportSpyPercentage);
		this.startBudget = CalculationUtil.roundDoubleCalcPrecision(this.sumRevenue * this.startBudgetPercentage);
	}
	
	/**
	 * @return the maxPersonal
	 */
	public Double getMaxPersonal() {
		return maxPersonal;
	}
	/**
	 * @param maxPersonal the maxPersonal to set
	 */
	public void setMaxPersonal(Double maxPersonal) {
		this.maxPersonal = maxPersonal;
	}
	/**
	 * @return the maxRD
	 */
	public Double getMaxRD() {
		return maxRD;
	}
	/**
	 * @param maxRD the maxRD to set
	 */
	public void setMaxRD(Double maxRD) {
		this.maxRD = maxRD;
	}
	/**
	 * @return the maxMarketing
	 */
	public Double getMaxMarketing() {
		return maxMarketing;
	}
	/**
	 * @param maxMarketing the maxMarketing to set
	 */
	public void setMaxMarketing(Double maxMarketing) {
		this.maxMarketing = maxMarketing;
	}
	/**
	 * @return the reportSmall
	 */
	public Double getReportSmall() {
		return reportSmall;
	}
	/**
	 * @param reportSmall the reportSmall to set
	 */
	public void setReportSmall(Double reportSmall) {
		this.reportSmall = reportSmall;
	}
	/**
	 * @return the reportMiddle
	 */
	public Double getReportMiddle() {
		return reportMiddle;
	}
	/**
	 * @param reportMiddle the reportMiddle to set
	 */
	public void setReportMiddle(Double reportMiddle) {
		this.reportMiddle = reportMiddle;
	}
	/**
	 * @return the reportBig
	 */
	public Double getReportBig() {
		return reportBig;
	}
	/**
	 * @param reportBig the reportBig to set
	 */
	public void setReportBig(Double reportBig) {
		this.reportBig = reportBig;
	}
	/**
	 * @return the reportSpy
	 */
	public Double getReportSpy() {
		return reportSpy;
	}
	/**
	 * @param reportSpy the reportSpy to set
	 */
	public void setReportSpy(Double reportSpy) {
		this.reportSpy = reportSpy;
	}
	/**
	 * @return the percentagePersonal
	 */
	public Double getPercentagePersonal() {
		return percentagePersonal;
	}
	/**
	 * @param percentagePersonal the percentagePersonal to set
	 */
	public void setPercentagePersonal(Double percentagePersonal) {
		this.percentagePersonal = percentagePersonal;
	}
	/**
	 * @return the percentageRD
	 */
	public Double getPercentageRD() {
		return percentageRD;
	}
	/**
	 * @param percentageRD the percentageRD to set
	 */
	public void setPercentageRD(Double percentageRD) {
		this.percentageRD = percentageRD;
	}
	/**
	 * @return the percentageMarketing
	 */
	public Double getPercentageMarketing() {
		return percentageMarketing;
	}
	/**
	 * @param percentageMarketing the percentageMarketing to set
	 */
	public void setPercentageMarketing(Double percentageMarketing) {
		this.percentageMarketing = percentageMarketing;
	}

	/**
	 * @return the logisticCosts
	 */
	public Double getLogisticCosts() {
		return logisticCosts;
	}

	/**
	 * @param logisticCosts the logisticCosts to set
	 */
	public void setLogisticCosts(Double logisticCosts) {
		this.logisticCosts = logisticCosts;
	}

	/**
	 * @return the logisticCostsPercentage
	 */
	public Double getLogisticCostsPercentage() {
		return logisticCostsPercentage;
	}

	/**
	 * @param logisticCostsPercentage the logisticCostsPercentage to set
	 */
	public void setLogisticCostsPercentage(Double logisticCostsPercentage) {
		this.logisticCostsPercentage = logisticCostsPercentage;
	}

	/**
	 * @return the amountCompanies
	 */
	public Integer getAmountCompanies() {
		return amountCompanies;
	}

	/**
	 * @param amountCompanies the amountCompanies to set
	 */
	public void setAmountCompanies(Integer amountCompanies) {
		this.amountCompanies = amountCompanies;
	}

	/**
	 * @return the amountAgents
	 */
	public Integer getAmountAgents() {
		return amountAgents;
	}

	/**
	 * @param amountAgents the amountAgents to set
	 */
	public void setAmountAgents(Integer amountAgents) {
		this.amountAgents = amountAgents;
	}

	/**
	 * @return the factorAgents
	 */
	public Double getFactorAgents() {
		return factorAgents;
	}

	/**
	 * @param factorAgents the factorAgents to set
	 */
	public void setFactorAgents(Double factorAgents) {
		this.factorAgents = factorAgents;
	}

	/**
	 * @return the sumProfit
	 */
	public Double getSumProfit() {
		return sumProfit;
	}

	/**
	 * @param sumProfit the sumProfit to set
	 */
	public void setSumProfit(Double sumProfit) {
		this.sumProfit = sumProfit;
	}

	/**
	 * @return the sumRevenue
	 */
	public Double getSumRevenue() {
		return sumRevenue;
	}

	/**
	 * @param sumRevenue the sumRevenue to set
	 */
	public void setSumRevenue(Double sumRevenue) {
		this.sumRevenue = sumRevenue;
	}

	/**
	 * @return the reportSmallPercentage
	 */
	public Double getReportSmallPercentage() {
		return reportSmallPercentage;
	}

	/**
	 * @param reportSmallPercentage the reportSmallPercentage to set
	 */
	public void setReportSmallPercentage(Double reportSmallPercentage) {
		this.reportSmallPercentage = reportSmallPercentage;
	}

	/**
	 * @return the reportMiddlePercentage
	 */
	public Double getReportMiddlePercentage() {
		return reportMiddlePercentage;
	}

	/**
	 * @param reportMiddlePercentage the reportMiddlePercentage to set
	 */
	public void setReportMiddlePercentage(Double reportMiddlePercentage) {
		this.reportMiddlePercentage = reportMiddlePercentage;
	}

	/**
	 * @return the reportBigPercentage
	 */
	public Double getReportBigPercentage() {
		return reportBigPercentage;
	}

	/**
	 * @param reportBigPercentage the reportBigPercentage to set
	 */
	public void setReportBigPercentage(Double reportBigPercentage) {
		this.reportBigPercentage = reportBigPercentage;
	}

	/**
	 * @return the reportSpyPercentage
	 */
	public Double getReportSpyPercentage() {
		return reportSpyPercentage;
	}

	/**
	 * @param reportSpyPercentage the reportSpyPercentage to set
	 */
	public void setReportSpyPercentage(Double reportSpyPercentage) {
		this.reportSpyPercentage = reportSpyPercentage;
	}
	
	/**
	 * @return the startBudget
	 */
	public Double getStartBudget() {
		return startBudget;
	}

	/**
	 * @param startBudget the startBudget to set
	 */
	public void setStartBudget(Double startBudget) {
		this.startBudget = startBudget;
	}

	/**
	 * @return the startBudgetPercentage
	 */
	public Double getStartBudgetPercentage() {
		return startBudgetPercentage;
	}

	/**
	 * @param startBudgetPercentage the startBudgetPercentage to set
	 */
	public void setStartBudgetPercentage(Double startBudgetPercentage) {
		this.startBudgetPercentage = startBudgetPercentage;
	}

	@Override
	public String toString() {
		return "InitializationBean [percentagePersonal=" + percentagePersonal
				+ ", percentageRD=" + percentageRD + ", percentageMarketing="
				+ percentageMarketing + ", maxPersonal=" + maxPersonal
				+ ", maxRD=" + maxRD + ", maxMarketing=" + maxMarketing
				+ ", reportSmall=" + reportSmall + ", reportMiddle="
				+ reportMiddle + ", reportBig=" + reportBig + ", reportSpy="
				+ reportSpy + ", logisticCosts=" + logisticCosts
				+ ", logisticCostsPercentage=" + logisticCostsPercentage
				+ ", amountCompanies=" + amountCompanies + ", amountAgents="
				+ amountAgents + ", factorAgents=" + factorAgents
				+ ", sumProfit=" + sumProfit + ", sumRevenue=" + sumRevenue
				+ "]";
	}
}
